package com.hut.mst.service.impl;

import com.hut.mst.dao.StudentMapper;
import com.hut.mst.pojo.Student;
import com.hut.mst.pojo.User;
import com.hut.mst.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 秃头不用洗发水
 * @Date: 2021-04-01
 * @Description:
 */
@Service
public class StudentServicelmpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    /**
     * 保存学生信息
     * @param student
     * @return
     */
    @Override
    public Student saveStudentBySid(Student student) {
        Student s = studentMapper.saveStudentBySid(student);

        return s;
    }

    /**
     * 更新学生信息
     * @param student
     * @return
     */
    @Override
    public Student updateStudentBySid(Student student) {
        return studentMapper.updateStudentBySid(student);
    }

    /**
     * 获取学生信息
     * @param sid
     * @return
     */
    @Override
    public Student getStudentInfo(Integer sid) {
        return studentMapper.getStudentInfo(sid);
    }
}
